<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        /* ul{
            display: flex;
            flex-flow: column nowrap;
            width: 500px;
            height: 500px;
            background-color: red;

        }
        li{
            flex: 1;
            list-style: none;
        } */
        .class{
            width: 300px;
            height: 300px;
            background-color: red;
            /* animation：动画名称 持续时间 运动曲线(匀速linear) 何时开始 播放次数(无限infinite ) 是否反方向(逆播放alternate) 动画起始或者结束的状态(保持forwards/回到起始backwards); */
            /* animation: ani 2s ease 0s infinite alternate-reverse; */
        }

        .come{
            animation: ani 2s forwards;
        }
        .go{
            animation: ani 2s reverse forwards;
        }
        @keyframes ani {
            0%{
            transform: translateX(-320px);
            }
           100%{
            transform: translateX(300px);
           }
        }
    </style>
</head>
<body>

    <div class="class come">

    </div>

    <ul>
        <li>1</li>
        <li>2</li>
      
      
    </ul>
</body>
</html>